import request from "@/utils/request";
export function getApproval(params) {
    return request({
        url: "/approval/search",
        method: "post",
        data: params
    });
}

export function addApproval(params) {
    return request({
        url: "/approval/insert",
        method: "post",
        data: params
    });
}

export function editApproval(params) {
    return request({
        url: `/approval/${params.id}`,
        method: "put",
        data: params
    });
}

export function deleteApproval(params) {
    return request({
        url: `/approval/delete`,
        method: "post",
        data: params
    });
}


export function getApprovalDetail(params) {
    return request({
        url: `/approval/searchDetailList/${params.id}`,
        method: "get",
    });
}

export function insertgai2(params) {
    return request({
        url: `/approval/detail/insertgai`,
        method: "post",
        data: params
    });
}


export function searchDetailListGai2(params) {
    return request({
        url: `/approval/searchDetailListGai/${params.id}`,
        method: "get",
        data: params
    });
}

export function financeUpdate(params) {
    return request({
        url: `/approval/financeUpdate/${params.id}`,
        method: "put",
        data: params
    });
}

export function directorUpdate(params) {
    return request({
        url: `/approval/directorUpdate/${params.id}`,
        method: "put",
        data: params
    });
}

export function expertDerive(params) {
    return request({
        url: `/approval/expertDerive/${params.approvalId}`,
        method: "get",
        data: params,
        responseType: 'blob'
    });
}

export function expertBankDerive(params) {
    return request({
        url: `/approval/expertBankDerive`,
        method: "post",
        data: params,
        responseType: 'blob'
    });
}
